<div class="sessions clearfix ">
  <div class="pull-right" style="position: relative;">
    <div class="sessions-main " style="height: 550px">
      <h3>欢迎注册Twitter</h3>
      <span>
        已有账号
        <%= link_to frontend_login_path do %>
          登录
        <% end %>
      </span>

      <%= simple_form_for @user, url: frontend_users_path, wrapper: :admin_theme, method: :post, html: {'data-parsley-validate': true, class: 'uk-panel uk-panel-box uk-form sessions-form', style: 'text-align: left;', autocomplete: 'off'} do |f| %>
        <%= f.input :name, label: "用户名", input_heml:{ required: true, placeholder: '' } %>
        <%= f.input :gender, as: :radio_buttons, label: "性别", collection: User.options_for_select(:genders), autofocus: true, require: true %>
        <%= f.input :password, label: "密码",  required: true, placeholder: ''  %>
        <%= f.input :password_confirmation, label: "确认密码",   required: true, placeholder: ''  %>
        <div class="uk-form-row uk-form-list">
<!--          <p class="ay_align_l ay_font_12 index-color-7">输入验证码</p>-->
          <div class="uk-grid">
            <div class="uk-width-7-10">
              <%= rucaptcha_input_tag(class: 'input-captcha uk-width-1-1 uk-form-large', placeholder: '请输入验证码') %>
            </div>
            <div class="uk-width-3-10">
              <%= rucaptcha_image_tag(alt: 'Captcha', class: 'img-captcha uk-width-1-1', style: 'height:40px', onclick: "refreshCaptcha()") %>
            </div>
          </div>
        </div>
        <div class="uk-form-row">
          <button class="uk-width-1-1 uk-button uk-button-theme uk-button-large uk-button-theme-width">登 入</button>
        </div>
      <% end %>
    </div>
  </div>

</div>
<%=debug @user.errors.count %>

<%= content_for :page_assets do %>
  <script>
      function refreshCaptcha() {
          $('.img-captcha').attr('src', '/rucaptcha');
      }
  </script>
<% end %>
